package edu.sctu.zhoumengxue.day201506.day20150628.test;

/**判断商品价格
 * Created by user12 on 2015/6/28.
 */
public class JudgePrice {
    public void getPrice(JsonAppbean appbean) {

        int countMax = 0;
        int countMin = 0;

        for (ListAppbean list:appbean.list){
            if(Double.parseDouble(list.goods_price)>100){
                countMax++;
            }
            if (Double.parseDouble(list.goods_price)<100){
                countMin++;
            }
        }

        System.out.println("商品价格大于100元的商品数量是："+countMax+"件");
        System.out.println("商品价格小于100元的商品数量是："+countMin+"件");
    }
}